<template>
	<view class="orderListWrapper">
		<view @click="gotoList(e)" class="item" v-for="(e,i) in orderTypeList" :key="i">
			{{e.formName}}
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				orderTypeList:[],
			}
		},
		onLoad(e) {
			console.log(e);
			this.title = e.name
			this.TypeIdChild = e.id
			this.dataSources = e.dataSources
			uni.setNavigationBarTitle({
				title:e.name
			})
			this.getListALL()
		},
		onReachBottom(){
			// this.pageNum++
			// this.getdata()
		},
		methods: {
			getListALL(){
				const listallPar ={
					openid:uni.getStorageSync('openid'),
					param:`{"formTypeIdChild":${this.TypeIdChild}}`,
				}
				this.$u.api.getListALL(listallPar).then(listAll => {
					this.orderTypeList = listAll.list
				})
			},
			gotoList(e){
				uni.navigateTo({
					url: `/subPages/FillWorkOrder/orderList?formId=${e.formId}&name=${e.formName}&dataSources=${this.dataSources}&TypeIdChild=${this.TypeIdChild}`
				});
			}
		}
	}
</script>

<style lang="scss" scoped>
	.orderListWrapper{
		width: 100%;
		box-sizing: border-box;
		padding: 30rpx;
		background-color: #f4f7fe;
		.item{
			width: 100%;
			box-sizing: border-box;
			padding: 20rpx;
			background-color: #fff;
			margin-bottom: 20rpx;
			border-radius: 20rpx;
			.info{
				width: 100%;
				.infoItem{
					width: 100%;
					display: flex;
					justify-content: space-between;
					align-items: center;
					height: 60rpx;
					.title{
						color: #000;
					}
					.value{
						width: 60%;
						color: #dbdbdb;
					}
					.people{
						color: #787393;
					}
					.name{
						color: #7187a5;
					}
					&:last-child{
						border-top: 2rpx solid #ededed;
						margin-top: 40rpx;
						.value{
							color: #000;
						}
					}
				}
			}
		}
	}
</style>